/* 角色
 A   管理员
 S   发货人（CM）
 C   委托单位（客户）
 W   康宁仓储
 authorities:['A','S','C','W']
 权限判断：如果是 /user开头不处理,则跳过校验
*/
export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', name: 'login', component: './User/Login' },

      { path: '/user/register', name: 'register', component: './User/Register' },
      {
        path: '/user/register-result',
        name: 'register.result',
        component: './User/RegisterResult',
      },
      {
        component: '404',
      },
    ],
  },
  //TraiMap
  {
    path: '/portal/orderTrackMapView',
    name: 'orderTrackMapView',
    // code: 'MyOrder', /:token&:customerCode&:orderNo&:type
    // hideInMenu: true,
    component: './Corelle/TrailMap/TrailMap',
  },
  {
    path: '/',
    name: 'track',
    component: './MyOrder/ExportOS/Trail',
  },
  // app
  {
    path: '/portal',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      // 我的订单
      {
        path: '/portal/myOrder',
        icon: 'snippets',
        name: 'Portal',
        code: 'MyOrder',
        routes: [
          // 轨迹平台
          {
            path: '/portal/myOrder/trailList',
            name: 'searchOrder',
            code: 'MyOrder_Trail',
            component: './MyOrder/ExportOS/Trail',
          },
          //轨迹地图
          {
            path: '/portal/myOrder/trailList/trailMap',
            name: 'myOrderTrailMap',
            component: './Corelle/TrailMap/TrailMap',
            hideInMenu: true,
          },
          //出口订单
          // {
          //   path: '/portal/myOrder/exportOSList/editExportOS/:id',
          //   name: 'exportOSEdit',
          //   component: './MyOrder/ExportOS/ExportOSOperate',
          //   hideInMenu: true,
          // },
          // {
          //   path: '/portal/myOrder/exportOSList/addExportOS',
          //   name: 'exportOSAdd',
          //   component: './MyOrder/ExportOS/ExportOSOperate',
          //   hideInMenu: true,
          // },

          // {
          //   path: '/portal/myOrder/exportOSList',
          //   name: 'exportOSList',
          //   component: './MyOrder/ExportOS/ExportOSList',
          //   code: 'MyOrder_Order',

          // },
        ],
      },
      //order
      {
        path:'/portal/order',
        icon:'dot-chart',
        name:'Order',
        code:'Order',
        routes:[
          //轨迹更新
          {
            path: '/portal/order/searchOrder',
            name: 'SearchOrder',
            code: 'Order_SearchOrder',
            component: './Order/SearchOrder/Trail',
          },
          {
            path: '/portal/order/trailUpdate',
            name: 'TrailUpdate',
            component: './Order/TrailUpdate/TrailUpdate',
            code: 'Order_TrailUpdate',
          }
        ]
      },
      //康宁业务
      {
        path: '/portal/corelle',
        icon: 'snippets',
        name: 'Corning',
        code: 'Corelle',
        routes: [
          //统计表
          {
            path: '/portal/corelle/orderAnalysis',
            name: 'Dashboard',
            component: './Corelle/MyOrder/OrderAnalysis',
            code: 'Corelle_OrderAnalysis',
          },
          //轨迹地图
          {
            path: '/portal/corelle/myOrderList/trailMap',
            name: 'trailMap',
            component: './Corelle/TrailMap/TrailMap',
            hideInMenu: true,
          },
          // 轨迹平台
          {
            path: '/portal/corelle/trailList',
            name: 'Track & Trace',
            code: 'Corelle_Trail',
            component: './MyOrder/ExportOS/Trail',
          },
          {
            path: '/portal/corelle/myOrderList',
            name: 'My Orders',
            component: './Corelle/MyOrder/MyOrderList',
            code: 'Corelle_Order',
          },
          //订单统计--报表：
          //   {
          //     path: '/corelle/statistics',
          //     name: 'statistics',
          //     code: 'statistics',
          //     component: './Reports/OrderStatistics',
          //     authorities: ['W'],
          //   },
        ],
      },
      //拓展功能
      {
        path: '/portal/expandFunction',
        icon: 'deployment-unit',
        name: 'Plug',
        code: 'ExpandFunction',
        routes: [
          //接口导入
          {
            path: '/portal/expandFunction/leadInPort',
            name: 'leadInPort',
            code: 'ExpandFunction_LeadInPort',
            component: './ExpandFunction/LeadInPort/LeadInPort',
          },
          {
            path: '/portal/expandFunction/leadPopInPort',
            name: 'leadPopInPort',
            code: 'ExpandFunction_LeadInPort',
            component: './ExpandFunction/LeadPopInPort/LeadInPort',
          },
          // 天马微登录用户管理
          {
            path: '/portal/expandFunction/TMWLoginList',
            name: 'TMWLoginList',
            code: 'ExpandFunction_TMWLogin',
            component: './expandFunction/TMWLogin/TMWLoginList',
          },
          {
            path: '/portal/expandFunction/TMWLoginList/edit-form/:id',
            name: 'TMWLoginList',
            component: './expandFunction/TMWLogin/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/expandFunction/TMWLoginList/add-form',
            name: 'TMWLoginListAdd',
            component: './expandFunction/TMWLogin/UpdateForm',
            hideInMenu: true,
          },
        ],
      },

      {
        name: 'exception',
        icon: 'warning',
        path: '/portal/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/portal/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/portal/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/portal/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/portal/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      //系统管理：
      {
        path: '/portal/system',
        icon: 'setting',
        name: 'System',
        code: 'SYSTEMMANA',
        routes: [
          //国际化语言
          {
            path: '/portal/system/LanguageList',
            name: 'LanguageList',
            code: 'CLIENTPAGE',
            component: './System/Language/LanguageList',
          },
          //客户管理
          {
            path: '/portal/system/ClientList',
            name: 'ClientList',
            code: 'CLIENTPAGE',
            component: './System/Client/ClientList',
          },
          {
            path: '/portal/system/ClientList/edit-form/:id',
            name: 'ClientEdit',
            component: './System/Client/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/system/ClientList/add-form',
            name: 'ClientAdd',
            component: './System/Client/UpdateForm',
            hideInMenu: true,
          },
          //业务组织管理
          {
            path: '/portal/system/OrgList',
            name: 'OrgList',
            code: 'ORGPAGE',
            component: './System/TmsOrg/OrgList',
          },
          {
            path: '/portal/system/OrgList/edit-form/:id',
            name: 'OrgEdit',
            component: './System/TmsOrg/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/system/OrgList/add-form',
            name: 'OrgAdd',
            component: './System/TmsOrg/UpdateForm',
            hideInMenu: true,
          },
          //用户管理
          {
            path: '/portal/system/AuthList',
            name: 'AuthList',
            code: 'USERPAGE',
            component: './System/TmsAuth/AuthList',
          },
          {
            path: '/portal/system/AuthList/edit-form/:id',
            name: 'AuthEdit',
            component: './System/TmsAuth/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/system/AuthList/add-form',
            name: 'AuthAdd',
            component: './System/TmsAuth/UpdateForm',
            hideInMenu: true,
          },
          //修改密码
          {
            path: '/portal/system/AuthList/passwd',
            name: 'Passwd',
            component: './User/UpdatePasswd',
            hideInMenu: true,
          },
          //角色管理
          {
            path: '/portal/system/RoleList',
            name: 'RoleList',
            code: 'ROLEPAGE',
            component: './System/TmsRole/RoleList',
          },
          {
            path: '/portal/system/RoleList/edit-form/:id',
            name: 'RoleEdit',
            component: './System/TmsRole/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/system/RoleList/add-form',
            name: 'RoleAdd',
            component: './System/TmsRole/UpdateForm',
            hideInMenu: true,
          },
          //菜单管理
          {
            path: '/portal/system/MenuList',
            name: 'MenuList',
            code: 'MENUPAGE',
            component: './System/TmsMenu/MenuList',
          },
          {
            path: '/portal/system/MenuList/edit-form/:id',
            name: 'MenuEdit',
            component: './System/TmsMenu/UpdateForm',
            hideInMenu: true,
          },
          {
            path: '/portal/system/MenuList/add-form',
            name: 'MenuAdd',
            component: './System/TmsMenu/UpdateForm',
            hideInMenu: true,
          },
          //字典管理
          {
            path: '/portal/system/dictList',
            name: 'DictList',
            code: 'DICTPAGE',
            component: './System/Dict/DictList',
          },
          {
            path: '/portal/system/dictList/dictEdit/:id',
            name: 'DictEdit',
            component: './System/Dict/DictOperate',
            hideInMenu: true,
          },
          {
            path: '/portal/system/dictList/dictAdd',
            name: 'DictAdd',
            component: './System/Dict/DictOperate',
            hideInMenu: true,
          },
          //数据字典管理
          {
            path: '/portal/system/dictDataList',
            name: 'DictDataList',
            code: 'DICTDATAPAGE',
            component: './System/DictData/DictDataList',
          },

          // 系统配置管理
          // {
          //   path: '/portal/system/SysConfigList',
          //   name: 'SysConfigList',
          //   code: 'SYSCONFIGPAGE',
          //   component: './System/SysConfig/SysConfigList',
          // },
          // {
          //   path: '/portal/system/SysConfigList/SysConfigEdit/:id',
          //   name: 'SysConfigEdit',
          //   component: './System/SysConfig/SysConfigOperate',
          //   hideInMenu: true,
          // },
          // {
          //   path: '/portal/system/SysConfigList/SysConfigAdd',
          //   name: 'SysConfigAdd',
          //   component: './System/SysConfig/SysConfigOperate',
          //   hideInMenu: true,
          // },
          //计划任务日志
          {
            path: '/portal/system/listScheduledTaskLog',
            name: 'ScheduledTaskLogList',
            code: 'SYSCONFIGPAGE',
            component: './System/ScheduledTaskLog/ScheduledTaskLogList',
          },
          //定时任务
          {
            path: '/portal/system/listCrontab',
            name: 'CrontabList',
            code: 'SYSCONFIGPAGE',
            component: './System/Crontab/CrontabList',
          },
          {
            path: '/portal/system/Crontab/CrontabEdit/:id',
            name: 'SysConfigEdit',
            component: './System/Crontab/CrontabOperate',
            hideInMenu: true,
          },
          {
            path: '/portal/system/Crontab/CrontabAdd',
            name: 'SysConfigAdd',

            component: './System/Crontab/CrontabOperate',
            hideInMenu: true,
          },
          //流水号管理
          {
            path: '/portal/system/SequenceList',
            name: 'SequenceList',
            code: 'SEQUENCEPAGE',
            component: './System/SystemSetting/Sequence/SequenceList',
          },
          {
            path: '/portal/system/SequenceList/SequenceEdit/:id',
            name: 'SequenceEdit',
            component: './System/SystemSetting/Sequence/SequenceOperate',
            hideInMenu: true,
          },

          {
            path: '/portal/system/SequenceList/SequenceAdd',
            name: 'SequenceAdd',
            component: './System/SystemSetting/Sequence/SequenceOperate',
            hideInMenu: true,
          },
          //数据权限管理
          // {
          //   path: '/portal/system/DataAuthorityList',
          //   name: 'DataAuthorityList',
          //   code: 'DATAPERM',
          //   component: './System/SystemSetting/DataAuthority/DataAuthorityList',
          // },
          // {
          //   path: '/portal/system/DataAuthorityList/DataAuthorityEdit/:id',
          //   name: 'DataAuthorityEdit',
          //   component: './System/SystemSetting/DataAuthority/DataAuthorityOperate',
          //   hideInMenu: true,
          // },

          // {
          //   path: '/portal/system/DataAuthorityList/DataAuthorityAdd',
          //   name: 'DataAuthorityAdd',
          //   component: './System/SystemSetting/DataAuthority/DataAuthorityOperate',
          //   hideInMenu: true,
          // },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
